package st.lib.base.ui.recycler;

import java.util.ArrayList;

/**
 * @author zhangyu
 * @date 2017/10/31
 */

public abstract class DataConverter {
    protected final ArrayList<MultipleItemEntity> mEntities = new ArrayList<>();
    private String mJsonData;

    public abstract ArrayList<MultipleItemEntity> convert();

    public String getJsonData() {
        if (mJsonData == null || mJsonData.isEmpty()) {
            throw new NullPointerException("JSON DATA IS NULL!");
        }
        return mJsonData;
    }

    public DataConverter setJsonData(String jsonData) {
        mJsonData = jsonData;
        return this;
    }
}
